home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 134 (1991-10)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 134 (1991-10)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / RxSlides / RxSlides.DOC < prev    next >
Text File  |  1990-03-08  |  8KB  |  218 lines

  1.                 RxSlides
  2.  
  3.         An IFF picture server controlled through ARexx
  4.  
  5.               Release 1.2  Nov. 6, 1988
  6.  
  7.         Placed in the public domain by Dean Bandes, author
  8.         You may use this in a commercial product, but if
  9.         you do, the decent thing to do is send me a free copy!
  10.  
  11.     RxSlides is a background (load-and-stay-resident) program which can pop
  12. up a picture upon command.  It will also make a transition from one picture
  13. to another, and has several types of transition.
  14.  
  15.     RxSlides is based on a program called "Dissolve" that I found on
  16. Amicus 15.  The author of that program, Lee M. Robertson, ( PLINK: lmr )
  17. wrote in his DOC file, "If someone was real ambitious they could do a
  18. program like Dpslide that did a lot of different displays with a display
  19. list."  I guess I was "real ambitious", because that's one of the things
  20. you can do with RxSlides.  Because the commands to this program can be
  21. written by an ARexx program, however, you can do much more powerful things
  22. than just write a display list.  For instance, the ARC file with this doc
  23. includes an ARexx program that can read the directory of a disk and display
  24. all the ".pic" pictures on it -- sort of a scriptless, automatic slide show.
  25.  
  26.     RxSlides has worked fine for me with 320 by 200 pictures, including HAM
  27. ones.  I can't guarantee that bigger pictures will work, but I think the
  28. main problem there is that I only have half a meg.
  29.  
  30.     Lee R. wrote that [dissolving one picture into another].."requires that the
  31. new picture has the same attributes (size, colors, ham, etc.) as the current
  32. picture, because you can't change the screen attributes between the pictures."
  33. What I tried to do was close the screen and open a new one if the attributes
  34. didn't match; but I may not have been 100% successful.  I partially got around
  35. the problem of colors by interpolating the color maps from the old picture
  36. into the new one.  This can give some pretty peculiar effects, so I suggest
  37. that if you are developing a set of pictures yourself, you keep the palettes
  38. as similar as possible between pictures.  For 32-color pictures, the color
  39. interpolation seems the least disturbing with the "dissolve" transition
  40. (and the "zap" transition, which doesn't interpolate and hardly counts).
  41. For the HAM pictures I've tried, the "dissolve" transition gives unpleasant
  42. results, but the "twipe" transition is beautiful.  I haven't tried the others
  43. in HAM, so see what you can see.  My suspicion is that the "bwipe" will be
  44. great, but that the "vblind" will stink.
  45.  
  46.     Unless you are running ARexx, RxSlides won't do a thing for you except
  47. chew up some of your memory.  If you don't have ARexx, and you ran RxSlides
  48. "just to see what it would do", it exited as soon as it failed to find the
  49. Rexx system library.
  50.  
  51.     If you have ARexx, create a rexx program file something like this
  52. (say its name is CPix.rexx):
  53.  
  54. /* Charley slideshow */
  55. address SLIDES
  56. 'trans zap'
  57. 'show df1:cluck.pic'
  58. 'wait 25'
  59. 'trans dissolve'
  60. 'show df1:robots.pic'
  61. 'wait 25'
  62. 'show df1:ghost4.pic'
  63. 'wait 50'
  64. 'exit'
  65.  
  66. This is assuming that you have 320 x 200 IFF picture files called
  67. "cluck.pic", "robots.pic", and "ghost4.pic" on your df1: disk.  Then do,
  68. from CLI or Wshell,
  69.  
  70. >rexxmast
  71. >RxSlides
  72.  
  73. then from Wshell
  74. >CPix (or whatever your rexx program is)
  75.  
  76. or from CLI
  77. >rx CPix
  78.  
  79. You should see the first picture appear on the screen, then dissolve
  80. into the second, then dissolve into the third; then after another second
  81. you will be back to the CLI screen.
  82.  
  83. Alternatively, copy autosli.rexx and RxSlides to ram: and cd to ram:.
  84. Start ARexx (by doing rexxmast if you haven't yet), put a disk with some
  85. 320 X 200 IFF picture files named <something>.pic in df1:, and run
  86. autosli.rexx (rx autosli from CLI, autosli from Wshell).  You should see
  87. an automatic slideshow.
  88.  
  89. Note that the Rexx address of this program is SLIDES.  If you run two
  90. copies of this at once, the address of the second is SLIDESA.  If you
  91. run a third, the address of the third should be SLIDESB, and so on to
  92. SLIDESZ, but I haven't tried more than two.
  93.  
  94. Commands accepted:
  95.  
  96.   show <filename>    display the IFF picture in <filename>
  97.  
  98.   speed <integer>    controls the number of picture bits set
  99.               between successive "blit"s; 1280 is the
  100.               default.
  101.  
  102.   wait <integer>    wait that number of 1/50-th's of a second
  103.               before accepting another command.  This
  104.               lets you control the speed of the slideshow.
  105.  
  106.               NOTE: this is 1/50-th's of a second!  It's
  107.               not the same as other slideshow programs I've
  108.               bumped into!  I decided to let you enter the
  109.               parameter that I will pass to the system Delay()
  110.               subroutine; this gives finer control of timing
  111.               for possible synchronization with music or
  112.               whatever.
  113.  
  114.   failat <integer>    gives you some control of how serious a problem
  115.               will cause the program to exit.  Default is
  116.               21, which asks the program to try its best
  117.               not to exit until you ask it to.  I recommend
  118.               that you leave this parameter alone.  The error
  119.               codes are as follows:
  120.  
  121.              1  Unknown command received from ARexx
  122.              5  File is not an ILBM picture file
  123.              6  File is not a picture file
  124.              7  Unable to open the file
  125.              8  File contains an invalid picture size
  126.              9  File is missing a bit map header
  127.             10  File BMHD chunk is the wrong size
  128.             11  Not enough memory for picture body
  129.             12  File has an invalid decode flag
  130.             13  Read error
  131.             14  Insufficient memory
  132.             15  Unable to open window
  133.             16  Unable to open screen
  134.             21  Program is exiting
  135.             22  Invalid command-line arguments
  136.             23  Unable to open required libraries
  137.             24  Unable to open message port
  138.  
  139.             The program "saysts.rexx" will report the above
  140.             error messages, given the error code; if it's on
  141.             the Rexx search path, then from WShell, just enter
  142.             (for instance) "saysts 14" and you will get
  143.             "Insufficient memory".
  144.  
  145.   index <integer>    I think that this controls which of several
  146.               pseudo-random bit patterns is used for the
  147.               "dissolve" transition.  This can be any integer
  148.               from 2 to 32, and values outside that range will
  149.               be limited to that range.  I'm not really sure
  150.               what this parameter does, and I recommend
  151.               that you leave it alone.
  152.  
  153.   trans <codeword or integer>
  154.             Controls the type of transition between pictures.
  155.               I took LMR's suggestions about some types of
  156.               effects and have implemented the following:
  157.  
  158.     trans zap        instantly pop up the new picture all at once.
  159. or  trans 0
  160.  
  161.     trans twipe        wipe the new picture from top to bottom
  162. or  trans 1
  163.  
  164.     trans bwipe        wipe the new picture from bottom to top
  165. or  trans 2
  166.  
  167.     trans lwipe        wipe the new picture from left to right
  168. or  trans 3
  169.  
  170.     trans rwipe        wipe the new picture from right to left
  171. or  trans 4
  172.  
  173.     trans vblind    venetian blinds transition -- new picture
  174. or  trans 5          appears as lots of vertical lines that get wider
  175.               and wider.  Try it, but I won't say "try it, you'll
  176.               like it".
  177.  
  178.     trans dissolve    the good old original, and I think the
  179. or  trans 6          best for widely differing palettes.
  180.  
  181.   front            pops the picture screen to the front.  Useful only
  182.               after --
  183.  
  184.   back            pushes the picture screen to the back.  You could
  185.               do this before Rexx wants to write some output,
  186.               and then do a "front"; or maybe have two copies
  187.               of RxSlides running, and flip-flop between the
  188.               two pictures.  Or load a picture of a nude and
  189.               do 'back';'wait 30000';'front';'wait 5';'back' --
  190.               for 1/10 of a second, after a 10 minute wait,
  191.               someone else using your machine will wonder if
  192.               he just hallucinated!
  193.  
  194.   close            close the picture window and screen, but leave
  195.               RxSlides running.  That way you don't have to
  196.               get RxSlides off the disk again to run it, but
  197.               of course it is taking up memory.
  198.  
  199.   exit            stop the RxSlides background process
  200.   quit            ditto
  201.  
  202. My source is intended for the Lattice C environment.
  203.  
  204. I'll now leave it up to your imagination to do other things with this.
  205. I hope to add more transition types.  Please write via US Mail with bug
  206. reports, news of applications using this, or suggested enhancements.
  207. Of course I wouldn't mind some shareware contributions, but since much of
  208. this was Lee Robertson's work I won't make a big pitch.  Hey -- somebody
  209. who's on PLINK, leave some mail for him to tell him what happened to his
  210. program!
  211.  
  212.     Good Luck,
  213.     Dean Bandes
  214.     225 Cypress Street
  215.     Newton Centre, MA 02159
  216.     (617) 965-1268
  217.     
  218.